package com.jacky.iot.models;

import com.influxdb.annotations.Column;
import com.influxdb.annotations.Measurement;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.Instant;

@Data
@Accessors(chain = true)
@Measurement(name = "cpu_usage")
public class CpuUsage {

    @Column(name = "host", tag = true)
    private String host;

    @Column(name = "cpu_model", tag = true)
    private String cpuModel;

    @Column(name = "cpu_core", tag = true)
    private String cpuCore;

    @Column(name = "time")
    private Instant _time;

    @Column(name = "usage")
    private double usage;

    @Column(name = "system")
    private Long system;

    @Column(name = "idle")
    private Long idle;

    @Column(name = "user")
    private Long user;

}
